import type { ArticleParams, ArticleRequestParams, channelResponse } from '@/types/user'
import { request } from '@/utils/request'

// 获取所有频道列表
export const getChannel = () => {
  return request<channelResponse>('/v1_0/channels', 'GET')
}

// 获取文章详情
export const getArticleChannel = (Params: ArticleParams) => {
  return request<ArticleRequestParams>('/v1_0/mp/articles', 'GET', Params)
}

// 删除业务
export const delArticle = (id: string) => {
  return request(`/v1_0/mp/articles/${id}`, 'DELETE')
}
